(function(){
	
	var ModuleNamePrefix = 'AppView.sys.user.';
	var ModuleUrlPrefix = '/sys/user/';
	
	Ext.define(ModuleNamePrefix + 'SysUserForm',{
		extend:'AppView.base.BaseForm',
		alias:'widget.sysuserform',
		defaults:{xtype:'textfield',labelWidth:60,anchor:'100%'},
		requires:['AppView.public.comboBox.OrganizationTreePicker'],
		url:ModuleUrlPrefix+'save.do',
		items:[
			{hidden:true,name:'id'},
			
			{
				fieldLabel:'账号',
				allowBlank:false,
				name:'account'
			},
			{
				fieldLabel:'密码',
				allowBlank:false,
				name:'password'
			},
			{
				fieldLabel:'姓名',
				allowBlank:false,
				name:'userName'
			},
			{
				xtype:'organizationtreepicker',
				allowBlank:false,
				fieldLabel : '所属部门',
				name : 'orgId'
			},
			{
				fieldLabel:'电话',
				name:'telphone'
			},
			{
				fieldLabel:'邮箱',
				name:'email'
			}
		],
		handleLoadSuccess:function(data){
		},
		initComponent:function(){
	    	this.callParent(arguments);
	    }
	})
	
	Ext.define(ModuleNamePrefix + 'SysUserWin',{
		extend:'AppView.base.FormWin',
		alias:'widget.sysuserwin',
		viewUrl:ModuleUrlPrefix+'view.do',
		height:270,
		title:'用户',
		items:[
			{
				xtype:'sysuserform'
			}
		]
	})
})()